const express = require("express");
const address = require('../../middleware/address/address')
const jwtParse = require('../../middleware/jwtParse/jwtParse')
const router = express.Router();
// 将请求体中的 JSON 数据解析为 JavaScript 对象，并将其作为 request.body 属性的值，供后续的中间件或路由处理。
router.use(express.json());
// 地址列表
router.get('/address_list',jwtParse, address.addressList)
// 地址信息
router.get('/addressInfo',jwtParse, address.addressInfo)
// 编辑地址
router.post('/addressEdit',jwtParse, address.addressEdit)
// 新增地址
router.post('/addressAdd',jwtParse, address.addressAdd)

module.exports = router